<template>
  <div class="">
    Test1
  </div>
</template>
<script lang="ts">
  import { Vue, Component } from 'vue-property-decorator'

  interface Person {
    name: string,
    age: number
  }

  function greeting (person:Person) {
    return `I am ${person.name} and ${person.age} years old`
  }

  interface American {
    firstName: string,
    secondName: string
  }

  function greeting2 (american:American) {
    console.log(american)
    return `I am ${american.firstName} ${american.secondName}`
  }

  class Student {
    fullName: string

    constructor (public firstName:string, public secondName:string, public lastName:string) {
      this.fullName = `${firstName} ${secondName} ${lastName}`
    }
  }

  const student = new Student('John', 'Conor', 'Smith')

  let array:[number, string]

  array = [1, 'age']

  const americanStudent = greeting2(student)

  @Component
  export default class Test extends Vue {
    created () {
      const result = greeting({name: 'defore', age: 24})
      console.log(americanStudent)
      console.log(result)
    }
  }
</script>
<style lang="scss" scpoed>
